package be.dch.gui.panels;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Icon;
import javax.swing.JLabel;
import javax.swing.JSeparator;

import com.jgoodies.forms.builder.PanelBuilder;
import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;

public final class MainPanel extends AbstractPanel implements ActionListener {

    /** * */
    private static final long serialVersionUID = 7762783940541751082L;

    private static MainPanel instance = new MainPanel();
    private static final String COLUMN_SPECS = "1dlu:grow,80dlu,1dlu:grow";
    private static final String ROW_SPECS = "3dlu,pref,3dlu,pref,3dlu";

    private MainPanel() {
	super();

	final FormLayout layout = new FormLayout(MainPanel.COLUMN_SPECS, MainPanel.ROW_SPECS);
	final CellConstraints constraints = new CellConstraints();
	final PanelBuilder builder = new PanelBuilder(layout);

	final JLabel lblStepOne = new JLabel("Step 1:");
	final JSeparator sepStepOne = new JSeparator();
	builder.add(lblStepOne, constraints.rc(2, 2));
	builder.add(sepStepOne, constraints.rc(4, 2));

	this.add(builder.getPanel());
    }

    public static MainPanel getInstance() {
	return MainPanel.instance;
    }

    public void actionPerformed(final ActionEvent event) {
	// TODO Auto-generated method stub
    }

    @Override
    public String getPanelTitle() {
	return "Main";
    }

    @Override
    public Icon getPanelIcon() {
	return this.createImageIcon("/images/file-openstreetmap-icon.png", "Main");
    }

}
